package com.javaweb.dao;

import com.javaweb.model.Permission;

import java.sql.SQLException;
import java.util.List;


public interface PermDao {

    public Integer insert(Permission perm) throws SQLException;

    public Integer insertRolePerm(int roleId, int permId)  throws SQLException ;
    public Permission selectOne(String name, String url)  throws SQLException ;
    public Permission selectOneById(int permId)  throws SQLException ;

    public List<Permission> selectPermsByRoleName(String roleName)  throws SQLException ;

    public List<Permission> selectPermsByRoleId(int roleId)  throws SQLException ;

    public Integer deleteById(int permId) throws SQLException ;

    public void updateByPerm(Permission perm) throws SQLException ;

}
